home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / bbs / pad321.zip / BUILD.CMD < prev    next >
OS/2 REXX Batch file  |  1996-09-21  |  2KB  |  88 lines

  1. @echo off
  2. if %1. == . goto commandLineError
  3. if %2. == . goto noSecondParam
  4.  
  5. set MEX_INCLUDE=%2
  6. if exist %MEX_INCLUDE%\max.mh goto maxOk
  7. echo Can't find file: %MEX_INCLUDE%\max.mh
  8. goto maxMhError
  9. :noSecondParam
  10. if exist ..\m\max.mh BUILD %1 ..\m
  11. goto maxMhError
  12.  
  13.  
  14. :maxOk
  15. if exist %1\mexp.exe goto mexpOk
  16. echo Can't find file: %1\mexp.exe
  17. goto done
  18. :mexpOk
  19. if exist getphone.mex goto getphoneOk
  20. echo Can't find file: getphone.mex
  21. goto done
  22. :getPhoneOk
  23.  
  24. %1\mexp init
  25. if errorlevel 1 goto compileError
  26. %1\mexp getphone
  27. if errorlevel 1 goto compileError
  28. %1\mexp checknum
  29. if errorlevel 1 goto compileError
  30. %1\mexp verify
  31. if errorlevel 1 goto compileError
  32. %1\meccap *.mec
  33. if errorlevel 1 goto compileError
  34.  
  35. echo.
  36. echo Compilation completed successfully.
  37. echo.
  38.  
  39. goto done
  40.  
  41. :commandLineError
  42.  
  43. if exist ..\MEXP.EXE goto clefmexp
  44. goto :nodefault
  45. :clefmexp
  46. BUILD ..
  47.  
  48. :nodefault
  49. echo Compiles all files necessary to run the Padlock call back verifier.
  50. echo.
  51. echo Syntax:
  52. echo.
  53. echo    BUILD [maximus directory] [mex include directories]
  54. echo.
  55. echo Where [maximus directory] is the name of the directory containing MECCAP.EXE
  56. echo and MEXP.EXE, and [mex include directories] includes the directory containing
  57. echo the file MAX.MH.
  58. echo.
  59. goto done
  60.  
  61. :maxMhError
  62. echo Please pass the directory containing max.mh as the second parameter
  63. echo to this batch file or type:
  64. echo.
  65. echo SET MEX_INCLUDE=[directory name]
  66. echo.
  67. echo before running this batch file, where [directory name] is the name
  68. echo of the directory containing max.mh. Usually, this file is located
  69. echo in a subdirectory of your main max directory called "m".
  70. echo.
  71. goto done
  72.  
  73. :compileError
  74. echo.
  75. echo Compilation errors were detected. These errors must be corrected
  76. echo before you can use Padlock. Compilation errors are often caused
  77. echo by mistakes in SETTINGS.MH. Double check your changes to this
  78. echo file and then run this batch file again. For more information on
  79. echo compile time errors, see section 14.3 of your Maximus documentation.
  80. echo.
  81. :done
  82.  
  83. if %2. == . goto end
  84.  
  85. set MEX_INCLUDE=
  86.  
  87. :end
  88.